import request from "@/utils/request";
export const getListAPi = (params: any) => {
  return request({
    url: "/carfilm/list",
    method: "get",
    params,
  });
};

export const infoApi = (id: number) => {
  return request({
    url: `/carfilm/${id}`,
    method: "get",
  });
};

export const categoryOptionsApi = () => {
  return request({
    url: "/carfilm/category",
    method: "get",
  });
};
export const addCategoryApi = (data: any) => {
  return request({
    url: "/carfilm/category/add",
    method: "post",
    data,
  });
};
export const addApi = (data: any) => {
  return request({
    url: "/carfilm/add",
    method: "post",
    data,
  });
};

export const editApi = (data: any) => {
  return request({
    url: "/carfilm/edit",
    method: "put",
    data,
  });
};

export const delApi = (id: number) => {
  return request({
    url: `/carfilm/${id}`,
    method: "delete",
  });
};
